// interface point2D {
//   x: number;
//   y: number;
// }

// interface point3D extends point2D {
//   z: number;
// }

// type point = point3D
// let p: point = {
//   x: 1,
//   y: 2,
//   z: 3
// }

interface Person {
  name: string;
  age: number;
  fn: () => void;
}

interface Contact {
  phone: string;
  address: string;
}

type PersonContact = Person & Contact;

let p: PersonContact = {
  name: 'zhangsan',
  age: 18,
  phone: '123456',
  address: 'beijing',
  fn() {
    console.log('hello')
  }
}